﻿//01. Write a program that reads a text file and prints on the console its odd lines.

using System;
using System.IO;

namespace TextFiles
{
    class PrintOddLines
    {
        static void Main()
        {
            using (StreamReader reader = new StreamReader("oddlines.txt"))
            {
                int lineNumber = 1;
                string line = reader.ReadLine();
                while (line != null)
                {
                    if (lineNumber % 2 != 0)
                    {
                        Console.WriteLine(line);
                    }
                    lineNumber++;
                    line = reader.ReadLine();
                }
            }
        }
    }
}
